package cn.huapu.power.energy.vo;

import java.io.Serializable;

/**
 * 分页的基本参数信息
 * @author hunter
 *
 */
public class Page implements Serializable{
	/**查询的分段的id标识*/
	private Long minId;
	private Long maxId;
	/**记录条数*/
	private long rows = 10;
	/**第几页*/
	private long page = 1;
	/**排序的列*/
	private String sort;
	/**排序的顺序ASC或者DESC*/
	private String order;
	/**获取记录总条数*/
	private long totalCount;
	
	public Long getMinId() {
		return minId;
	}
	public void setMinId(Long minId) {
		this.minId = minId;
	}
	public Long getMaxId() {
		return maxId;
	}
	public void setMaxId(Long maxId) {
		this.maxId = maxId;
	}
	public String getSort() {
		return sort;
	}
	public void setSort(String sort) {
		this.sort = sort;
	}
	public String getOrder() {
		return order;
	}
	public void setOrder(String order) {
		this.order = order;
	}
	public long getRows() {
		return rows;
	}
	public void setRows(long rows) {
		this.rows = rows;
	}
	public long getPage() {
		return page;
	}
	public void setPage(long page) {
		this.page = page;
	}
	public long getLimit() {
		long limit =(page-1)*rows;
		return limit<0 ? 0:limit;
	}
	
	public long getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(long totalCount) {
		this.totalCount = totalCount;
	}
	@Override
	public String toString() {
		return "Page [minId=" + minId + ", maxId=" + maxId + ", rows=" + rows + ", page=" + page + ", sort=" + sort
				+ ", order=" + order + "]";
	}
	
}
